package ding.com.multifragment;

import android.content.Context;
import android.support.v4.app.Fragment;

import ding.com.multifragment.struct.FuntionsManager;

/**
 * Created by ding on 2017/9/29.
 */

public  class BaseFragment extends Fragment {
    public FuntionsManager mFuntionsManager;
    public MainActivity mainActivity;
    public void setFuntionsManager(FuntionsManager manager) {
        this.mFuntionsManager = manager;
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        if (context instanceof MainActivity){
            mainActivity= (MainActivity) context;
            mainActivity.setFuntionsManager(this);
        }else {

        }
    }


}
